// pages/paySucc/paySucc.js
const app = getApp()
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function(options) {
        var that = this
        var years = new Date().getFullYear()
        that.setData({
            isChinese: wx.getStorageSync("isChinese"),
            years: years
        })
        wx.setNavigationBarTitle({
            title: that.data.isChinese ? "付款结果" : "Payment result"
        })
    },
    webView() {
        wx.navigateTo({
            url: '../webView/webView',
            success: function(res) {},
            fail: function(res) {},
            complete: function(res) {},
        })
    },
    goIndex() {
        app.globalData.ifIndexOnshow = 1
        wx.switchTab({
            url: '../index/index',
            success: function(res) {},
            fail: function(res) {},
            complete: function(res) {},
        })
    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function() {
        return {
            title: this.data.isChinese ? "我刚刚在OnePartyGo买了票，快来看看吧" : "I just bought a ticket at OnePartyGo, come and check it out.",
            path: '/pages/index/index',
            success: function(res) {
                // 转发成功
            },
            fail: function(res) {
                // 转发失败
            }
        }
    }
})